package com.restaurant.application.customer;

import com.nebutown.description.UnitDescription;
import com.nebutown.generation.basictype.UID;

/**
 * @author Administrator
 */
public class CustomerDesc extends UnitDescription {
    public static void main(String[] args) {
        getUnitDescription().run("./");
    }

    private static UnitDescription getUnitDescription() {
        UnitDescription desc = UnitDescription.basicUnit(Customer.class, "CustomerData");
        desc.nextBean("CustomerData")
                .add("id", String.class)
                .add("createTime", Long.class)
                .add("modifyTime", Long.class)
                .add("avatarUrl", String.class)
                .add("nickName", String.class)
                .add("realName", String.class)
                .add("gender", String.class)
                .add("birthday", String.class)
                .add("openId", String.class)
                .add("phone", String.class)
                .add("level", String.class)
                .add("levelName", String.class)
                .add("number", String.class)
                .add("qrCodeUrl", String.class)
                .add("qrCodeUid", UID.class)
                .add("usableScores", Integer.class)
                .add("totalScores", Integer.class)
                .add("state", String.class)
                .add("address", String.class)
        ;
        desc.addUiFunction("modify", "CustomerData");
        desc.addUiFunction("addBlack", null);
        desc.addUiFunction("moveOutBlack", null);
        return desc;
    }
}
